class CreateUsers < ActiveRecord::Migration
  def self.up
    create_table "users", :force => true do |t|
      t.database_authenticatable :null => false
      t.recoverable
      t.rememberable
      t.trackable
      t.lockable
      # t.confirmable

      t.string :cpf,  :null => false, :limit => 11
      t.string :name, :null => false

      t.integer :roles_mask

      t.timestamps
    end

    add_index :users, :cpf,                  :unique => true
    add_index :users, :email,                :unique => true
    add_index :users, :reset_password_token, :unique => true
    add_index :users, :unlock_token,         :unique => true
    # add_index :users, :confirmation_token,   :unique => true
  end

  def self.down
    drop_table "users"
  end
end
